package com.example.springbootstartermqttprovider.controller;

import lombok.AllArgsConstructor;
import lombok.Data;

import javax.xml.bind.annotation.*;
import java.util.List;

@Data
@AllArgsConstructor
@XmlRootElement(name = "body")
@XmlAccessorType(XmlAccessType.FIELD)
public class DY47Response {
    @XmlElement(name = "totalNumber")
    private int totalNumber;

    @XmlElement(name = "reserve1")
    private String reserve1;
    
    @XmlElement(name = "reserve2")
    private String reserve2;
    
    @XmlElement(name = "reserve3")
    private String reserve3;

    @XmlElementWrapper(name = "lists")
    @XmlElement(name = "list")
    private List<Transaction> loopResult;

    // 无参构造方法（JAXB必需）
    public DY47Response() {
    }

    // Getter和Setter方法
    // 此处省略具体实现，建议通过IDE生成
}

@XmlAccessorType(XmlAccessType.FIELD)
@Data
@AllArgsConstructor
class Transaction {
    @XmlElement(name = "acceptNo")
    private String acceptNo;

    @XmlElement(name = "result")
    private int result;

    @XmlElement(name = "resultMsg")
    private String resultMsg;

    @XmlElement(name = "oppositeAcctNo")
    private String oppositeAcctNo;

    @XmlElement(name = "oppositeBankNo")
    private String oppositeBankNo;

    @XmlElement(name = "debitFlag")
    private int debitFlag;

    @XmlElement(name = "businessCode")
    private String businessCode;

    @XmlElement(name = "backhostGyno")
    private String backhostGyno;

    @XmlElement(name = "subpoenaSeqNo")
    private int subpoenaSeqNo;

    @XmlElement(name = "transDate")
    private String transDate;

    @XmlElement(name = "transAmount")
    private String transAmount;

    @XmlElement(name = "reserve1")
    private String reserve1;

    @XmlElement(name = "reserve2")
    private String reserve2;

    @XmlElement(name = "reserve3")
    private String reserve3;

    // 无参构造方法（JAXB必需）
    public Transaction() {
    }

    // Getter和Setter方法
    // 此处省略具体实现，建议通过IDE生成
}